$b: 100%;
@each $count in 10, 12, 24 {
  $i: $count;
  .con-#{$count} {
    display: flex;

    box-sizing: border-box;
    @while $i > 0 {
      .span-#{$i} {
        width: calc($i/$count*$b);

        box-sizing: border-box;
      }
      .col-#{$i} {
        height: calc($i/$count*$b);

        box-sizing: border-box;
      }
      .offset-#{$i} {
        margin-left: calc($i/$count*$b);

        box-sizing: border-box;
      }
      $i: $i - 1;
    }
  }
}